home *** CD-ROM | disk | FTP | other *** search
- #ifndef FWGXUTIL_H
- #define FWGXUTIL_H
-
- //========================================================================================
- //
- // File: FWGXUtil.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWGXCFG_H
- #include "FWGXCfg.h"
- #endif
-
- #ifdef FW_SUPPORT_GX // This file is only for QuickDraw GX
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWEXCDEF_H
- #include "FWExcDef.h"
- #endif
-
- #ifdef FWODEXCE_H
- #include "FWODExce.h"
- #endif
-
- #ifndef __GXTYPES__
- #include <GXTypes.h>
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- struct Environment;
-
- class ODFrame;
- class ODShape;
- class ODFacet;
-
- //========================================================================================
- // Global functions
- //========================================================================================
-
- // General utils
-
- FW_Boolean FW_IsGXInstalled();
-
- void FW_GX_Initialize();
- void FW_GX_Terminate();
-
- //========================================================================================
- // class FW_CGraphicContextGX
- //========================================================================================
-
- FW_CLASS_ATTR class FW_CGraphicContextGX FW_AUTO_DESTRUCT_OBJECT
- {
- // ----- Construction/destruction
-
- public:
- FW_CGraphicContextGX(
- Environment* ev,
- ODFacet* facet,
- ODShape* invalidShape = NULL);
- virtual ~FW_CGraphicContextGX();
-
- // ----- Drawing
-
- public:
-
- void DrawShape(gxShape shape);
- gxTransform GetGXTransform() const;
-
- // ----- Implementation
-
- private:
- gxTransform fGXTransform;
- gxViewPort fGXViewPort;
-
- // -----
-
- gxMapping fMapping;
- gxMapping fOldMapping;
-
- void SetupTransformMapping(
- Environment* ev,
- ODFacet* facet);
-
- void RestoreTransformMapping();
-
- // -----
-
- gxShape fTransformClipOld;
-
- void SetupTransformClipping(
- Environment* ev,
- ODFacet* facet);
-
- void RestoreTransformClipping();
-
- // -----
-
- gxShape fViewPortClipOld;
-
- void SetupViewPortClipping(
- Environment* ev,
- ODFacet* facet,
- ODShape* invalidShape);
-
- void RestoreViewPortClipping();
- };
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif // FW_SUPPORT_GX
-
- #endif // FWGXUTIL_H
-